<?php
namespace backend\models;

use phpDocumentor\Reflection\DocBlock\Tags\Var_;
use Yii;
use yii\base\Model;

class main extends Model
{
  public function getType(){
    $sql = "select `id`,`type` FROM `zt_blog_type`";
    $result  = Yii::$app->db->createCommand($sql)->queryAll();
    var_dump($result);
    return $result;
  }

}
?>